package com.beone.smart.smartBeauty.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 推荐方案-文章内容
 */
@Data
@TableName(value = "recommend_article")
public class RecommendArticleDO {
    //记录的主键id
    private String id;
    //标题
    private String title;
    //展示的banner图片
    private String imgUrl;
    //内容
    @NotBlank
    private String content;
    /**
     * 推荐的类型
     * 0-减肥
     * 1-补水
     * 2-美肤
     * 3-祛痘
     */
    @NotNull
    private int type;
    /**
     * 浏览次数
     */
    private int readNumber;
    /**
     * 新建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDate;
}
